--************************************************************************
--* Written by Jirat Boomuang
--* Filename: 02-ChangeDateNameToAD-YYYYMMDD-Format01-20130106-v1.0.sql
--* Revision: 1.0
--* Author: JiratB
--* Platform: T-SQL on SQL Server 2008 R2
--* Description: Update the date name of all records with the desire format
--* 
--************************************************************************

--************************************************************************
--* Revision History
--------------------------------------------------------------------------
--* Revision  Date      Signature    Description
--------------------------------------------------------------------------
--* 1.0       20130119  JiratB       - Released to Codeplex
--************************************************************************

--************************************************************************
-- Database
--************************************************************************
use AdventureWorksCycles_MSCRM;

--------------------------------------------------------------------------
--* Statement: Update vxrm_datename
--* Description: Update the date name of all records with the desire format
--------------------------------------------------------------------------
update dbo.vxrm_dateExtensionBase
set
	vxrm_datename = 
		vxrm_TextYearAD + '-' + vxrm_TextMonth + '-' + vxrm_TextDay
where
	vxrm_datename is not null;

go
--------------------------------------------------------------------------

--************************************************************************
-- End of file
--************************************************************************